package main

import "fmt"

type Personer interface {
	SayHello()
}
type student struct {
}

func (s *student) SayHello() {
	fmt.Println("老师好")
}

type teacher struct {
}

func (t *teacher) SayHello() {
	fmt.Println("同学们好")
}
func main() {
	//var stu Student
	//stu.
	var p Personer
	var stu student
	p = &stu
	p.SayHello()
	var tea teacher
	p = &tea
	p.SayHello()

}
